home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip: 25 Years Anniversary
/
CHIP_25Jahre_Jubilaeum.iso
/
G DATA AddOns2
/
WebShop
/
_SETUP.1
/
sb2permbasket.js
< prev
next >
Wrap
Text File
|
2002-02-13
|
5KB
|
116 lines
<!-- sb2permbasket Basket functions -->
<!-- (c) Copyright 2001 GS Software -->
<!-- -->
<SCRIPT LANGUAGE="JavaScript">
function miniBasket()
{
var tablerowcolor = '#F0F0F0';
totprice = 0;
var datum = new Date();
if (parent.theBasket.length>1) {
for (var i = 1; i < parent.theBasket.length; i++)
{
with(parent.theBasket[i])
{
theitem=Item;
thequantity = Quantity; //fulllist.substring(itemstart, itemend);
itemtotal = 0;
if ((parseFloat(Price2)>0) && (parseInt(Quantity) >= parseInt(Quantity2)))
theprice=Price2
else
if ((parseFloat(Price1)>0) && (parseInt(Quantity) >= parseInt(Quantity1)))
theprice=Price1
else
theprice = Price;
itemtotal = (eval(theprice*thequantity));
temptotal = itemtotal * 100;
totprice = totprice + itemtotal;
if(Attribut1=='') A1=''; else A1=', '+Attribut1;
if(Attribut2=='') A2=''; else A2=', '+Attribut2;
if(Attribut3=='') A3=''; else A3=', '+Attribut3;
itemlist=i;
hilf="";
if (Textin != "") hilf="<br> "+Textin;
}
}
document.writeln('<table class="basketsmall" width="100%" border="0" cellspacing="0" cellpadding="0">');
document.writeln('<tr BGCOLOR="#F8F8F8">');
document.write('<td width="50" nowrap class="basketsmall" align="left" valign="top"> <a href="main.htm" class="none" target="Hauptframe" onFocus="if(this.blur)this.blur()"><img src="kl_home.gif" border="0" align="absmiddle" alt="Home"></a>');
document.write(' <a href="basket.htm" class="none" target="Hauptframe" onFocus="if(this.blur)this.blur()"><img src="kl_fragezeichen.gif" border="0" align="absmiddle" alt="Warenkorb anzeigen"></a>');
// Create unique transaction number
mydate = String(datum.getDate());
if (mydate.length<2) {
mydate = "0" +mydate;
}
mymonth = String(datum.getMonth());
if (mymonth.length<2) {
mymonth = "0" +mymonth;
}
myyear = String(datum.getYear());
if (myyear.length<4) {
myyear = String(1900+datum.getYear());
}
myhours = String(datum.getHours()); if (myhours.length<2) { myhours = "0" +myhours; } parent.pid = mydate+mymonth+myyear+myhours+'{shopid}'+String(datum.getMinutes())+String(datum.getSeconds())+String(Math.round(Math.random()*9999));
document.writeln('</td>');
document.writeln('<td width="200" nowrap class="basketsmall" align="left" valign="top" nowrap>');
document.writeln('<a href="basket.htm" target="Hauptframe">'+(parent.theBasket.length-1)+ ' '+parent.Loc_InBasket+'</a></td>');
document.writeln('</td>');
document.write('<td class="basketsmall" align="right" valign="top" nowrap>');
document.write('<b>{Currency} ');
document.write(parent.alterError(totprice)+'</b>');
{IfUseCurrency1}
document.write(' ({Currency1} '+parent.alterError(totprice*{CURRENCYCONVERTER1})+')');
{ElseIfUseCurrency1}
{EndIfUseCurrency1}
document.writeln('</td>');
document.writeln('</tr>');
document.writeln('</table>');
}
else {
document.writeln('<table class="basketsmallempty" width="100%" border="0" cellspacing="0" cellpadding="0">');
document.writeln('<tr nowrap>'); // BGCOLOR="#C0C0C0"
document.write('<td width="50" nowrap class="basketsmallempty" align="left" valign="top"> <a href="main.htm" class="none" target="Hauptframe" onFocus="if(this.blur)this.blur()"><img src="kl_home.gif" border="0" align="absmiddle" alt="Home"></a>');
document.write(' <a href="basket.htm" class="none" target="Hauptframe" onFocus="if(this.blur)this.blur()"><img src="kl_fragezeichen.gif" border="0" align="absmiddle" alt="Warenkorb anzeigen"></a>');
document.writeln('</td>');
document.writeln('<td width="200" nowrap class="basketsmallempty" align="left" valign="top">'+parent.Loc_BasketEmpty);
document.writeln('</td>');
document.writeln('<td nowrap class="basketsmallempty" align="right" valign="top"> </td>');
document.writeln('</tr>');
document.writeln('</table>');
}
}
</SCRIPT>